/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bts.back.translateToTerm;

import bts.back.BtsTerm;
import bts.back.LinkToTerm;

/**
 *
 * @author juan
 */
public class createTermFromTranslation {
    
    private BtsTerm termToLink;
    private BtsTerm newTerm;
    
    public createTermFromTranslation(BtsTerm termToLink){
        this.termToLink=termToLink;  
    }
    
    public boolean hasTermToLink(){
        return (this.termToLink!=null);
    }
    
    public void createTerm(String name, String language){
        newTerm=new bts.back.BtsTerm(name);
        //newTerm.setLanguage(language);
        //newTerm;
    }
    
    public BtsTerm getNewTerm(){
        return this.newTerm;
    }
    
    public void linkTerm(){
        if(this.hasTermToLink()){
            this.termToLink.addLink(new bts.back.LinkToTerm(newTerm, ""));
        }
    }
    
    

}
